package org.tinygroup.sdpm.zhang.business.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.tinygroup.sdpm.zhang.business.inter.GoodsManager;
import org.tinygroup.sdpm.zhang.dao.inter.GoodsDao;
import org.tinygroup.sdpm.zhang.dao.inter.pojo.Goods;


@Service
public class GoodsManagerImpl implements GoodsManager {

    @Autowired
    private GoodsDao goodsDao;

    @Override
    public Goods getByKey(String pk){
        return goodsDao.getByKey(pk);
    }

    @Override
    public void deleteByKey(String pk){
        goodsDao.deleteByKey(pk);
    }

    @Override
    public Goods add(Goods goods){
        return goodsDao.add(goods);
    }

    @Override
    public int edit(Goods goods){
        return  goodsDao.edit(goods);
    }
}
